//
//  RTCWebSocketManager.h
//  YouinRTC
//
//  Created by 潘欣 on 2022/8/20.
//

#import <Foundation/Foundation.h>
#import <SocketRocket/SocketRocket.h>
#import <AFNetworking/AFNetworking.h>
NS_ASSUME_NONNULL_BEGIN
@protocol RTCWebSocketManagerDelegate <NSObject>

@optional
-(void)socketConnect;
@end
@interface RTCWebSocketManager : NSObject<SRWebSocketDelegate>
@property (strong, nonatomic) SRWebSocket *socket;
@property (strong, nonatomic) NSTimer *heatBeat;
@property (assign, nonatomic) NSTimeInterval reConnectTime;
@property (strong, nonatomic) NSString *serverURL;
@property (nonatomic,weak) id<RTCWebSocketManagerDelegate>delegate;
@property (nonatomic,assign) bool isConnected;
@property (nonatomic,strong) AFNetworkReachabilityManager *netWorkManager;
@property (nonatomic,assign) BOOL isReconnected;
- (void)initWebSocket;
-(void)close;
-(void)send:(NSString *)message;
@end

NS_ASSUME_NONNULL_END
